package pl.edu.agh.som.learning;

public class LinearLearning implements ILearningFunction {

    private double initialValue;
    private double valueStep;

    public LinearLearning(double initialValue, int learningSteps) {
        this.initialValue = initialValue;
        this.valueStep = initialValue/learningSteps;
    }

    @Override
    public double evaluate(int learningStep) {
        return initialValue - learningStep*valueStep;
    }
}
